IF (NOT CHOLMOD_ROOT)
  SET(CHOLMOD_ROOT $ENV{SUITESPARSE_ROOT})
ENDIF()
IF (CHOLMOD_LIBRARIES)
  #we were given the exact list of libraries to find
  KOKKOSKERNELS_FIND_IMPORTED(CHOLMOD INTERFACE
    LIBRARIES ${CHOLMOD_LIBRARIES}
    LIBRARY_PATHS ${CHOLMOD_LIBRARY_DIRS}
    HEADERS cholmod.h
    HEADER_PATHS ${CHOLMOD_INCLUDE_DIRS})
ELSE()
  #we need to find one of the valid versions from the list below
  KOKKOSKERNELS_FIND_IMPORTED(CHOLMOD
    LIBRARY cholmod
    LIBRARY_PATHS ${CHOLMOD_LIBRARY_DIRS}
    HEADERS cholmod.h
    HEADER_PATHS ${CHOLMOD_INCLUDE_DIRS})
ENDIF()
